<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title>nuevo usuario</title>
	<script>
		function checkPwd () {
			var pwd			= document.getElementById('pwd'),
				rpwd		= document.getElementById('rpwd'),
				goodColor	= "#66cc66",
				badColor	= "#ff6666",
				oldColor	= pwd.style.backgroundColor;
			if (pwd.value === '' && rpwd.value === '')
				rpwd.style.backgroundColor = oldColor;
			else
				rpwd.style.backgroundColor = (pwd.value === rpwd.value) ? 
					goodColor : badColor;
		}
	</script>
</head>
<body>
	<form autocomplete="off">
	<label for="usr">Nombre</label>
	<input type="text" id="usr" placeholder="escriba su nombre"><br>
	<label for="pwd">Password</label>
	<input type="password" id="pwd" placeholder="escriba password" onblur="checkPwd();" onkeyup="checkPwd();"><br>
	<label for="rpwd">Repita su password</label>
	<input type="password" id="rpwd" placeholder="repita password" onblur="checkPwd();" onkeyup="checkPwd();"><br>
	<label for="email">Email</label>
	<input type="text" id="email" placeholder="escriba su email" ><br>
	<input type="submit" value="Ok" >
	</form>
</body>
</html>
